﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using TeamCommunitySolution.Domain.DataLayer.Base;

namespace TeamCommunitySolution.Domain.DataLayer.Leagues
{
    public class League
    {
        public virtual string Id { get; set; }
        public virtual string Name { get; set; }
        public virtual int TeamSize { get; set; }
        public virtual SystemUser Owner { get; set; }
        public virtual IList<Team> TeamList { get; set; }
        public virtual bool IsComplete { get; set; }
        public virtual IList<LeagueMeeting> MeetingList { get; set; }

        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return false;
            }

            if (!(obj is League))
            {
                return false;
            }

            League other = obj as League;

            return other.Id.Equals(this.Id);
        }
    }
}
